import request from "@/utils/axios";

// /order/auth/trade
// 订单列表
 export const reqOrderTrade = ()=>{
    return request({
        method:"get",
        url:"/order/auth/trade"
    })
 }



//  提交订单  /order/auth/submitOrder?tradeNo={tradeNo}

export const reqSubmitOrder = ({ tradeNo,...data}) => {
  return request({
    method: "post",
    url: "/order/auth/submitOrder",
    params: {
      tradeNo,
    },
    data,
  });
};

//  /api/payment/weixin/createNative/{orderId}
//   获取订单支付信息 二维码
  export const reqPaymentImg = (orderId) => {
    return request({
      method: "get",
      url: `/payment/weixin/createNative/${orderId}`,
    });
  };

  // /api/order/auth/{page}/{limit}

  // 获取我的订单详情
  export const reqOrderAuth =(page,limit)=>{
     return request({
        method:"get",
         url:`/order/auth/${page}/${limit}`
     })
  }


  // /api/payment/weixin/queryPayStatus/{orderId}

  // 查询订单支付的状态
  export const reqQueryPayStatus = (orderId) => {
    return request({
      method: "get",
      url: `/payment/weixin/queryPayStatus/${orderId}`,
    });
  };